package com.wf.course.web.quarz;

import java.text.SimpleDateFormat;
import java.util.Date;

import org.apache.log4j.Logger;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.quartz.QuartzJobBean;
import org.springframework.stereotype.Component;

import com.wf.course.service.IBillService;

@Component
public class BillDownloadJob extends QuartzJobBean{
	
	private Logger log = Logger.getLogger(BillDownloadJob.class);
	@Autowired
	private IBillService billService;
	
	protected void executeInternal(JobExecutionContext context) throws JobExecutionException {
		log.info("获取微信账单，开始..."+new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date()));
		this.billService.saveBill();
	}

	public void setBillService(IBillService billService) {
		this.billService = billService;
	}

	
}
 
